#
# Makefile for NewLife libs
#
export CC := i386-elf-gcc -g -c
export AS := nasm -f elf
export AR := i386-elf-ar -rcu

../libgloss.a : crt0.o libs
	i386-elf-ld -r -o ../libgloss.o *.o
	$(AR) $@ *.o
	i386-elf-ranlib $@

crt0.o : crt0.s
	$(AS) -o $@ crt0.s

libs : *.c
	$(CC) -c *.c

all : ../lib/libgloss.a ./Makefile

rebuild : clean all

clean :
	- rm *.o ../libgloss.a 

.PHONY : all clean rebuild
